package StudentProject.bean;

/**
 * 用户信息类
 */
public class User {
    private int userid;//用户id
    private String uname;//用户账号
    private String password;//用户密码
    private int type; //用户类型(1.表示管理员2.表示普通用户)

    public User(String uname, String password) {
        this.uname = uname;
        this.password = password;
    }

    public User() {
    }

    public User(int userid, String uname, String password) {
        this.userid = userid;
        this.uname = uname;
        this.password = password;
    }

    public User(int userid, String uname) {
        this.userid = userid;
        this.uname = uname;
    }

    public User(int userid, String uname, String password, int type) {
        this.userid = userid;
        this.uname = uname;
        this.password = password;
        this.type = type;
    }

    public int getUserid() {
        return userid;
    }

    public void setUserid(int userid) {
        this.userid = userid;
    }

    public String getUname() {
        return uname;
    }

    public void setUname(String uname) {
        this.uname = uname;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    @Override
    public String toString() {
        return "User{" +
                "userid=" + userid +
                ", uname='" + uname + '\'' +
                ", password='" + password + '\'' +
                ", type=" + type +
                '}';
    }
}
